Upgrade genapic code to 2.6.16-rc6 codebase. Remove entries from
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 20 Mar 2006 16:01:16 +0000 (17:01 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 20 Mar 2006 16:01:16 +0000 (17:01 +0100)
genapic structure that Xen does not require (mostly because we do
not support Visual Workstation nor IBM/Sequent NUMA-Q).

Signed-off-by: Keir Fraser <keir@xensource.com>
19 files changed:
xen/arch/x86/genapic/default.c
xen/arch/x86/genapic/es7000.h
xen/arch/x86/genapic/es7000plat.c
xen/include/asm-x86/genapic.h
xen/include/asm-x86/mach-bigsmp/mach_apic.h
xen/include/asm-x86/mach-bigsmp/mach_apicdef.h
xen/include/asm-x86/mach-default/mach_apic.h
xen/include/asm-x86/mach-default/mach_apicdef.h
xen/include/asm-x86/mach-default/mach_ipi.h
xen/include/asm-x86/mach-default/mach_mpparse.h
xen/include/asm-x86/mach-es7000/mach_apic.h
xen/include/asm-x86/mach-es7000/mach_apicdef.h
xen/include/asm-x86/mach-es7000/mach_mpparse.h
xen/include/asm-x86/mach-generic/mach_apic.h
xen/include/asm-x86/mach-generic/mach_apicdef.h
xen/include/asm-x86/mach-generic/mach_mpparse.h
xen/include/asm-x86/mach-summit/mach_apic.h
xen/include/asm-x86/mach-summit/mach_apicdef.h
xen/include/asm-x86/mach-summit/mach_mpparse.h

index d84cf4114186fd909623e91ce483e592ae07bd54..88853e02902c77f0eac0c10b3dc3a17be4c26f78 100644 (file)
 #include <asm/mach-default/mach_ipi.h>
 #include <asm/mach-default/mach_mpparse.h>
 
+#ifdef CONFIG_HOTPLUG_CPU
+#define DEFAULT_SEND_IPI       (1)
+#else
+#define DEFAULT_SEND_IPI       (0)
+#endif
+
+int no_broadcast = DEFAULT_SEND_IPI;
+integer_param("no_ipi_broadcast", no_broadcast);
+
 /* should be called last. */
 static __init int probe_default(void)
 { 
@@ -25,3 +34,12 @@ static __init int probe_default(void)
 } 
 
 struct genapic apic_default = APIC_INIT("default", probe_default); 
+
+static int __init print_ipi_mode(void)
+{
+       if (genapic == &apic_default)
+               printk("Using IPI %sShortcut mode\n",
+                      no_broadcast ? "No-" : "");
+       return 0;
+}
+__initcall(print_ipi_mode);
index 70691f0c4ce28a8ae5cd9b6fb7fa517c5d6ba509..f1e3204f5deca799b82060afdfd0666eb13d20df 100644 (file)
  * http://www.unisys.com
  */
 
+/*
+ * ES7000 chipsets
+ */
+
+#define NON_UNISYS             0
+#define ES7000_CLASSIC         1
+#define ES7000_ZORRO           2
+
+
 #define        MIP_REG                 1
 #define        MIP_PSAI_REG            4
 
@@ -104,7 +113,8 @@ struct mip_reg {
 #define        MIP_SW_APIC             0x1020b
 #define        MIP_FUNC(VALUE)         (VALUE & 0xff)
 
-extern int parse_unisys_oem (char *oemptr, int oem_entries);
-extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length);
+extern int parse_unisys_oem (char *oemptr);
+extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
+extern void setup_unisys(void);
 extern int es7000_start_cpu(int cpu, unsigned long eip);
 extern void es7000_sw_apic(void);
index 1f7150f9f9b113695cd7e0525aa5cb33f4a82360..032ac972d714baa3bf6c9430958ab7a42f62a2c4 100644 (file)
@@ -49,7 +49,7 @@ struct mip_reg                *host_reg;
 int                    mip_port;
 unsigned long          mip_addr, host_addr;
 
-#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT))
+#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI)
 
 /*
  * GSI override for ES7000 platforms.
@@ -60,6 +60,9 @@ static unsigned int base;
 static int
 es7000_rename_gsi(int ioapic, int gsi)
 {
+       if (es7000_plat == ES7000_ZORRO)
+               return gsi;
+
        if (!base) {
                int i;
                for (i = 0; i < nr_ioapics; i++)
@@ -71,14 +74,31 @@ es7000_rename_gsi(int ioapic, int gsi)
        return gsi;
 }
 
-#endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)
+#endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */
+
+void __init
+setup_unisys(void)
+{
+       /*
+        * Determine the generation of the ES7000 currently running.
+        *
+        * es7000_plat = 1 if the machine is a 5xx ES7000 box
+        * es7000_plat = 2 if the machine is a x86_64 ES7000 box
+        *
+        */
+       if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
+               es7000_plat = ES7000_ZORRO;
+       else
+               es7000_plat = ES7000_CLASSIC;
+       ioapic_renumber_irq = es7000_rename_gsi;
+}
 
 /*
  * Parse the OEM Table
  */
 
 int __init
-parse_unisys_oem (char *oemptr, int oem_entries)
+parse_unisys_oem (char *oemptr)
 {
        int                     i;
        int                     success = 0;
@@ -93,7 +113,7 @@ parse_unisys_oem (char *oemptr, int oem_entries)
 
        tp += 8;
 
-       for (i=0; i <= oem_entries; i++) {
+       for (i=0; i <= 6; i++) {
                type = *tp++;
                size = *tp++;
                tp -= 2;
@@ -128,40 +148,24 @@ parse_unisys_oem (char *oemptr, int oem_entries)
                default:
                        break;
                }
-               if (i == 6) break;
                tp += size;
        }
 
        if (success < 2) {
-               es7000_plat = 0;
-       } else {
-               printk("\nEnabling ES7000 specific features...\n");
-               /*
-                * Determine the generation of the ES7000 currently running.
-                *
-                * es7000_plat = 0 if the machine is NOT a Unisys ES7000 box
-                * es7000_plat = 1 if the machine is a 5xx ES7000 box
-                * es7000_plat = 2 if the machine is a x86_64 ES7000 box
-                *
-                */
-               if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
-                       es7000_plat = 2;
-               else
-                       es7000_plat = 1;
-
-               ioapic_renumber_irq = es7000_rename_gsi;
-       }
+               es7000_plat = NON_UNISYS;
+       } else
+               setup_unisys();
        return es7000_plat;
 }
 
 int __init
-find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length)
+find_unisys_acpi_oem_table(unsigned long *oem_addr)
 {
        struct acpi_table_rsdp          *rsdp = NULL;
        unsigned long                   rsdp_phys = 0;
        struct acpi_table_header        *header = NULL;
        int                             i;
-       struct acpi_table_sdt           sdt = { 0 };
+       struct acpi_table_sdt           sdt;
 
        rsdp_phys = acpi_find_rsdp();
        rsdp = __va(rsdp_phys);
@@ -199,13 +203,11 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length)
                                acpi_table_print(header, sdt.entry[i].pa);
                                t = (struct oem_table *) __acpi_map_table(sdt.entry[i].pa, header->length);
                                addr = (void *) __acpi_map_table(t->OEMTableAddr, t->OEMTableSize);
-                               *length = header->length;
                                *oem_addr = (unsigned long) addr;
                                return 0;
                        }
                }
        }
-       Dprintk("ES7000: did not find Unisys ACPI OEM table!\n");
        return -1;
 }
 
@@ -298,7 +300,7 @@ es7000_stop_cpu(int cpu)
 void __init
 es7000_sw_apic()
 {
-       if (es7000_plat == 1) {
+       if (es7000_plat) {
                int mip_status;
                struct mip_reg es7000_mip_reg;
 
index 3e9f9270c19d6f1e4ad068d8bf9b1c92c7f5438e..e7c1356dcb96720230681e0fa831bf229943aa13 100644 (file)
@@ -34,24 +34,14 @@ struct genapic {
        physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map);
 
        void (*clustered_apic_check)(void);
-       int (*multi_timer_check)(int apic, int irq);
        int (*apicid_to_node)(int logical_apicid); 
        int (*cpu_to_logical_apicid)(int cpu);
        int (*cpu_present_to_apicid)(int mps_cpu);
        physid_mask_t (*apicid_to_cpu_present)(int phys_apicid);
-       int (*mpc_apic_id)(struct mpc_config_processor *m, 
-                          struct mpc_config_translation *t); 
-       void (*setup_portio_remap)(void); 
        int (*check_phys_apicid_present)(int boot_cpu_physical_apicid);
        void (*enable_apic_mode)(void);
        u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb);
 
-       /* mpparse */
-       void (*mpc_oem_bus_info)(struct mpc_config_bus *, char *, 
-                                struct mpc_config_translation *);
-       void (*mpc_oem_pci_bus)(struct mpc_config_bus *, 
-                               struct mpc_config_translation *); 
-
        /* When one of the next two hooks returns 1 the genapic
           is switched to this. Essentially they are additional probe 
           functions. */
@@ -60,7 +50,6 @@ struct genapic {
        int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id);
 
        unsigned (*get_apic_id)(unsigned long x);
-       unsigned long apic_id_mask;
        unsigned int (*cpu_mask_to_apicid)(cpumask_t cpumask);
        
        /* ipi */
@@ -86,19 +75,13 @@ struct genapic {
        APICFUNC(init_apic_ldr), \
        APICFUNC(ioapic_phys_id_map), \
        APICFUNC(clustered_apic_check), \
-       APICFUNC(multi_timer_check), \
        APICFUNC(apicid_to_node), \
        APICFUNC(cpu_to_logical_apicid), \
        APICFUNC(cpu_present_to_apicid), \
        APICFUNC(apicid_to_cpu_present), \
-       APICFUNC(mpc_apic_id), \
-       APICFUNC(setup_portio_remap), \
        APICFUNC(check_phys_apicid_present), \
-       APICFUNC(mpc_oem_bus_info), \
-       APICFUNC(mpc_oem_pci_bus), \
        APICFUNC(mps_oem_check), \
        APICFUNC(get_apic_id), \
-       .apic_id_mask = APIC_ID_MASK, \
        APICFUNC(cpu_mask_to_apicid), \
        APICFUNC(acpi_madt_oem_check), \
        APICFUNC(send_IPI_mask), \
index fe7d4fcec03bd4bfcaed930f80e1c7a165a6d931..4a591053ba89f048b2b92ca7cfe927557e9c1b8a 100644 (file)
@@ -1,17 +1,10 @@
 #ifndef __ASM_MACH_APIC_H
 #define __ASM_MACH_APIC_H
-#include <asm/smp.h>
-
-#define SEQUENTIAL_APICID
-#ifdef SEQUENTIAL_APICID
-#define xapic_phys_to_log_apicid(phys_apic) ( (1ul << ((phys_apic) & 0x3)) |\
-               ((phys_apic<<2) & (~0xf)) )
-#elif CLUSTERED_APICID
-#define xapic_phys_to_log_apicid(phys_apic) ( (1ul << ((phys_apic) & 0x3)) |\
-               ((phys_apic) & (~0xf)) )
-#endif
-
-#define NO_BALANCE_IRQ (1)
+
+
+extern u8 bios_cpu_apicid[];
+
+#define xapic_phys_to_log_apicid(cpu) (bios_cpu_apicid[cpu])
 #define esr_disable (1)
 
 static inline int apic_id_registered(void)
@@ -19,7 +12,6 @@ static inline int apic_id_registered(void)
        return (1);
 }
 
-#define APIC_DFR_VALUE (APIC_DFR_CLUSTER)
 /* Round robin the irqs amoung the online cpus */
 static inline cpumask_t target_cpus(void)
 { 
@@ -32,29 +24,34 @@ static inline cpumask_t target_cpus(void)
        } while (cpu >= NR_CPUS);
        return cpumask_of_cpu(cpu);
 }
-#define TARGET_CPUS    (target_cpus())
 
-#define INT_DELIVERY_MODE dest_Fixed
-#define INT_DEST_MODE 1     /* logical delivery broadcast to all procs */
+#undef APIC_DEST_LOGICAL
+#define APIC_DEST_LOGICAL      0
+#define TARGET_CPUS            (target_cpus())
+#define APIC_DFR_VALUE         (APIC_DFR_FLAT)
+#define INT_DELIVERY_MODE      (dest_Fixed)
+#define INT_DEST_MODE          (0)    /* phys delivery to target proc */
+#define NO_BALANCE_IRQ         (0)
+#define WAKE_SECONDARY_VIA_INIT
+
 
 static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
 {
-       return 0;
+       return (0);
 }
 
-/* we don't use the phys_cpu_present_map to indicate apicid presence */
-static inline unsigned long check_apicid_present(int bit) 
+static inline unsigned long check_apicid_present(int bit)
 {
-       return 1;
+       return (1);
 }
 
-#define apicid_cluster(apicid) (apicid & 0xF0)
-
-static inline unsigned long calculate_ldr(unsigned long old)
+static inline unsigned long calculate_ldr(int cpu)
 {
-       unsigned long id;
-       id = xapic_phys_to_log_apicid(hard_smp_processor_id());
-       return ((old & ~APIC_LDR_MASK) | SET_APIC_LOGICAL_ID(id));
+       unsigned long val, id;
+       val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
+       id = xapic_phys_to_log_apicid(cpu);
+       val |= SET_APIC_LOGICAL_ID(id);
+       return val;
 }
 
 /*
@@ -67,37 +64,30 @@ static inline unsigned long calculate_ldr(unsigned long old)
 static inline void init_apic_ldr(void)
 {
        unsigned long val;
+       int cpu = smp_processor_id();
 
        apic_write_around(APIC_DFR, APIC_DFR_VALUE);
-       val = apic_read(APIC_LDR) & ~APIC_LDR_MASK;
-       val = calculate_ldr(val);
+       val = calculate_ldr(cpu);
        apic_write_around(APIC_LDR, val);
 }
 
 static inline void clustered_apic_check(void)
 {
        printk("Enabling APIC mode:  %s.  Using %d I/O APICs\n",
-               "Cluster", nr_ioapics);
-}
-
-static inline int multi_timer_check(int apic, int irq)
-{
-       return 0;
+               "Physflat", nr_ioapics);
 }
 
 static inline int apicid_to_node(int logical_apicid)
 {
-       return 0;
+       return (0);
 }
 
-extern u8 bios_cpu_apicid[];
-
 static inline int cpu_present_to_apicid(int mps_cpu)
 {
        if (mps_cpu < NR_CPUS)
-               return (int)bios_cpu_apicid[mps_cpu];
-       else
-               return BAD_APICID;
+               return (int) bios_cpu_apicid[mps_cpu];
+
+       return BAD_APICID;
 }
 
 static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
@@ -109,32 +99,15 @@ extern u8 cpu_2_logical_apicid[];
 /* Mapping from cpu number to logical apicid */
 static inline int cpu_to_logical_apicid(int cpu)
 {
-       if (cpu >= NR_CPUS)
-              return BAD_APICID;
-       return (int)cpu_2_logical_apicid[cpu];
- }
-
-static inline int mpc_apic_id(struct mpc_config_processor *m,
-                       struct mpc_config_translation *translation_record)
-{
-       printk("Processor #%d %d:%d APIC version %d\n",
-               m->mpc_apicid,
-               (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
-               (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
-               m->mpc_apicver);
-       return m->mpc_apicid;
+       if (cpu >= NR_CPUS)
+               return BAD_APICID;
+       return cpu_physical_id(cpu);
 }
 
 static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
 {
        /* For clustered we don't have a good way to do this yet - hack */
-       return physids_promote(0xFUL);
-}
-
-#define WAKE_SECONDARY_VIA_INIT
-
-static inline void setup_portio_remap(void)
-{
+       return physids_promote(0xFFL);
 }
 
 static inline void enable_apic_mode(void)
index 23e58b317c797616d66f1db3d284df6ee2e622af..4842ed8ba2cf84f1a255ac7f5576524e31af75fe 100644 (file)
@@ -1,11 +1,9 @@
 #ifndef __ASM_MACH_APICDEF_H
 #define __ASM_MACH_APICDEF_H
 
-#define                APIC_ID_MASK            (0x0F<<24)
-
 static inline unsigned get_apic_id(unsigned long x) 
 { 
-       return (((x)>>24)&0x0F);
+       return (((x)>>24)&0xFF);
 } 
 
 #define                GET_APIC_ID(x)  get_apic_id(x)
index 922c2fa57acabf18b23c9c20e994998b4b2dacbf..b1c76fe27bc80965f1d1603592bd2fe8f1286832 100644 (file)
@@ -60,11 +60,6 @@ static inline void clustered_apic_check(void)
                                        "Flat", nr_ioapics);
 }
 
-static inline int multi_timer_check(int apic, int irq)
-{
-       return 0;
-}
-
 static inline int apicid_to_node(int logical_apicid)
 {
        return 0;
@@ -89,21 +84,6 @@ static inline physid_mask_t apicid_to_cpu_present(int phys_apicid)
        return physid_mask_of_physid(phys_apicid);
 }
 
-static inline int mpc_apic_id(struct mpc_config_processor *m, 
-                       struct mpc_config_translation *translation_record)
-{
-       printk("Processor #%d %d:%d APIC version %d\n",
-                       m->mpc_apicid,
-                       (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
-                       (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
-                       m->mpc_apicver);
-       return (m->mpc_apicid);
-}
-
-static inline void setup_portio_remap(void)
-{
-}
-
 static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
 {
        return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map);
index 7bcb350c3ee80f7b76448fee2f7dac3fcfb6fc97..db8c9237e06f9c1959a60d591695139c9843cc09 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef __ASM_MACH_APICDEF_H
 #define __ASM_MACH_APICDEF_H
 
-#define                APIC_ID_MASK            (0xF<<24)
-
 static inline unsigned get_apic_id(unsigned long x) 
 { 
        return (((x)>>24)&0xF);
index 6f2b17a2008995d4939313982b165a8937ea6214..a1d0072e36bc8f9fc15163544b2c374db789527a 100644 (file)
@@ -4,11 +4,32 @@
 void send_IPI_mask_bitmask(cpumask_t mask, int vector);
 void __send_IPI_shortcut(unsigned int shortcut, int vector);
 
+extern int no_broadcast;
+
 static inline void send_IPI_mask(cpumask_t mask, int vector)
 {
        send_IPI_mask_bitmask(mask, vector);
 }
 
+static inline void __local_send_IPI_allbutself(int vector)
+{
+       if (no_broadcast) {
+               cpumask_t mask = cpu_online_map;
+
+               cpu_clear(smp_processor_id(), mask);
+               send_IPI_mask(mask, vector);
+       } else
+               __send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
+}
+
+static inline void __local_send_IPI_all(int vector)
+{
+       if (no_broadcast)
+               send_IPI_mask(cpu_online_map, vector);
+       else
+               __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
+}
+
 static inline void send_IPI_allbutself(int vector)
 {
        /*
@@ -18,13 +39,13 @@ static inline void send_IPI_allbutself(int vector)
        if (!(num_online_cpus() > 1))
                return;
 
-       __send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
+       __local_send_IPI_allbutself(vector);
        return;
 }
 
 static inline void send_IPI_all(int vector)
 {
-       __send_IPI_shortcut(APIC_DEST_ALLINC, vector);
+       __local_send_IPI_all(vector);
 }
 
 #endif /* __ASM_MACH_IPI_H */
index 1d38324825807254a254c90158030185c2a2f570..d14108505bb8905401f61ddab7f93fd34c3ce533 100644 (file)
@@ -1,17 +1,6 @@
 #ifndef __ASM_MACH_MPPARSE_H
 #define __ASM_MACH_MPPARSE_H
 
-static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, 
-                               struct mpc_config_translation *translation)
-{
-//     Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
-}
-
-static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, 
-                               struct mpc_config_translation *translation)
-{
-}
-
 static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, 
                char *productid)
 {
index 1d89ed2de53d709faaa28a888213bfa409f8bf91..86264f01bdcfa3d8992ea6e4bd571f177762f166 100644 (file)
@@ -89,11 +89,6 @@ static inline void clustered_apic_check(void)
                "Physical Cluster" : "Logical Cluster", nr_ioapics, cpus_addr(TARGET_CPUS)[0]);
 }
 
-static inline int multi_timer_check(int apic, int irq)
-{
-       return 0;
-}
-
 static inline int apicid_to_node(int logical_apicid)
 {
        return 0;
@@ -128,27 +123,12 @@ static inline int cpu_to_logical_apicid(int cpu)
        return (int)cpu_2_logical_apicid[cpu];
 }
 
-static inline int mpc_apic_id(struct mpc_config_processor *m, struct mpc_config_translation *unused)
-{
-       printk("Processor #%d %d:%d APIC version %d\n",
-               m->mpc_apicid,
-               (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
-               (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
-               m->mpc_apicver);
-       return (m->mpc_apicid);
-}
-
 static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map)
 {
        /* For clustered we don't have a good way to do this yet - hack */
        return physids_promote(0xff);
 }
 
-
-static inline void setup_portio_remap(void)
-{
-}
-
 extern unsigned int boot_cpu_physical_apicid;
 static inline int check_phys_apicid_present(int cpu_physical_apicid)
 {
index a58ab5a75c8c57c5743a15f4f0fc1587f182a492..4842ed8ba2cf84f1a255ac7f5576524e31af75fe 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef __ASM_MACH_APICDEF_H
 #define __ASM_MACH_APICDEF_H
 
-#define                APIC_ID_MASK            (0xFF<<24)
-
 static inline unsigned get_apic_id(unsigned long x) 
 { 
        return (((x)>>24)&0xFF);
index a7c2658e3c0285fbaf548f609450589a04cda903..eb8b6c6665ea149540c9fef064c111737d224dba 100644 (file)
@@ -1,39 +1,46 @@
 #ifndef __ASM_MACH_MPPARSE_H
 #define __ASM_MACH_MPPARSE_H
 
-static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, 
-                               struct mpc_config_translation *translation)
-{
-       Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
-}
-
-static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, 
-                               struct mpc_config_translation *translation)
-{
-}
+#include <xen/acpi.h>
 
-extern int parse_unisys_oem (char *oemptr, int oem_entries);
-extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length);
+extern int parse_unisys_oem (char *oemptr);
+extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
+extern void setup_unisys(void);
 
 static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
                char *productid)
 {
        if (mpc->mpc_oemptr) {
                struct mp_config_oemtable *oem_table = 
-                       (struct mp_config_oemtable *)(long)mpc->mpc_oemptr;
+                       (struct mp_config_oemtable *)mpc->mpc_oemptr;
                if (!strncmp(oem, "UNISYS", 6))
-                       return parse_unisys_oem((char *)oem_table, oem_table->oem_length);
+                       return parse_unisys_oem((char *)oem_table);
        }
        return 0;
 }
 
+static inline int es7000_check_dsdt(void)
+{
+       struct acpi_table_header *header = NULL;
+       if(!acpi_get_table_header_early(ACPI_DSDT, &header))
+               acpi_table_print(header, 0);
+       if (!strncmp(header->oem_id, "UNISYS", 6))
+               return 1;
+       return 0;
+}
+
 /* Hook from generic ACPI tables.c */
 static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
 {
        unsigned long oem_addr; 
-       int oem_entries;
-       if (!find_unisys_acpi_oem_table(&oem_addr, &oem_entries))
-               return parse_unisys_oem((char *)oem_addr, oem_entries);
+       if (!find_unisys_acpi_oem_table(&oem_addr)) {
+               if (es7000_check_dsdt())
+                       return parse_unisys_oem((char *)oem_addr);
+               else {
+                       setup_unisys();
+                       return 1;
+               }
+       }
        return 0;
 }
 
index d9dc039da94a3a12b4902d477bb48c0e6d8f205e..1e0f6b94359ca18c9cb81bc73751f9837f4242c9 100644 (file)
 #define init_apic_ldr (genapic->init_apic_ldr)
 #define ioapic_phys_id_map (genapic->ioapic_phys_id_map)
 #define clustered_apic_check (genapic->clustered_apic_check) 
-#define multi_timer_check (genapic->multi_timer_check)
 #define apicid_to_node (genapic->apicid_to_node)
 #define cpu_to_logical_apicid (genapic->cpu_to_logical_apicid) 
 #define cpu_present_to_apicid (genapic->cpu_present_to_apicid)
 #define apicid_to_cpu_present (genapic->apicid_to_cpu_present)
-#define mpc_apic_id (genapic->mpc_apic_id) 
-#define setup_portio_remap (genapic->setup_portio_remap)
 #define check_apicid_present (genapic->check_apicid_present)
 #define check_phys_apicid_present (genapic->check_phys_apicid_present)
 #define check_apicid_used (genapic->check_apicid_used)
 #define enable_apic_mode (genapic->enable_apic_mode)
 #define phys_pkg_id (genapic->phys_pkg_id)
 
+static inline int mpc_apic_id(struct mpc_config_processor *m, 
+                       struct mpc_config_translation *translation_record)
+{
+       printk("Processor #%d %d:%d APIC version %d\n",
+                       m->mpc_apicid,
+                       (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
+                       (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
+                       m->mpc_apicver);
+       return (m->mpc_apicid);
+}
+
+static inline void setup_portio_remap(void)
+{
+}
+
+static inline int multi_timer_check(int apic, int irq)
+{
+       return 0;
+}
+
 extern void generic_bigsmp_probe(void);
 
 #endif /* __ASM_MACH_APIC_H */
index 28ed98972ca84a98fbdd2a38dceb8dbdb94e5ca9..78eada84422a2f1f5b75fa64d9b957625a9f74cb 100644 (file)
@@ -5,7 +5,6 @@
 #include <asm/genapic.h>
 
 #define GET_APIC_ID (genapic->get_apic_id)
-#define APIC_ID_MASK (genapic->apic_id_mask)
 #endif
 
 #endif
index dbd9fce54f4d52be2ddf59fa667d5330fad50f05..b2308e914914b6a064284a54f35b3491db4994c7 100644 (file)
@@ -1,10 +1,16 @@
 #ifndef _MACH_MPPARSE_H
 #define _MACH_MPPARSE_H 1
 
-#include <asm/genapic.h>
+static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, 
+                               struct mpc_config_translation *translation)
+{
+       Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
+}
 
-#define mpc_oem_bus_info (genapic->mpc_oem_bus_info)
-#define mpc_oem_pci_bus (genapic->mpc_oem_pci_bus)
+static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, 
+                               struct mpc_config_translation *translation)
+{
+}
 
 int mps_oem_check(struct mp_config_table *mpc, char *oem, char *productid); 
 int acpi_madt_oem_check(char *oem_id, char *oem_table_id); 
index c43074a7aeae4f2573fb9be1dae67f361b7529ff..3ba02dc27679418453e57213fea19460c6e587bd 100644 (file)
@@ -68,11 +68,6 @@ static inline void init_apic_ldr(void)
        apic_write_around(APIC_LDR, val);
 }
 
-static inline int multi_timer_check(int apic, int irq)
-{
-       return 0;
-}
-
 static inline int apic_id_registered(void)
 {
        return 1;
@@ -116,21 +111,6 @@ static inline physid_mask_t apicid_to_cpu_present(int apicid)
        return physid_mask_of_physid(0);
 }
 
-static inline int mpc_apic_id(struct mpc_config_processor *m, 
-                       struct mpc_config_translation *translation_record)
-{
-       printk("Processor #%d %d:%d APIC version %d\n",
-                       m->mpc_apicid,
-                       (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8,
-                       (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4,
-                       m->mpc_apicver);
-       return (m->mpc_apicid);
-}
-
-static inline void setup_portio_remap(void)
-{
-}
-
 static inline int check_phys_apicid_present(int boot_cpu_physical_apicid)
 {
        return 1;
index a58ab5a75c8c57c5743a15f4f0fc1587f182a492..4842ed8ba2cf84f1a255ac7f5576524e31af75fe 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef __ASM_MACH_APICDEF_H
 #define __ASM_MACH_APICDEF_H
 
-#define                APIC_ID_MASK            (0xFF<<24)
-
 static inline unsigned get_apic_id(unsigned long x) 
 { 
        return (((x)>>24)&0xFF);
index 75b06db77f1e5631881e07713dcf1b05e1c19a00..a951babe1d6baf06927f4688d59b95ea3040bcd7 100644 (file)
@@ -11,17 +11,6 @@ extern void setup_summit(void);
 #define setup_summit() {}
 #endif
 
-static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, 
-                               struct mpc_config_translation *translation)
-{
-       Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
-}
-
-static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, 
-                               struct mpc_config_translation *translation)
-{
-}
-
 extern int usb_early_handoff;
 static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, 
                char *productid)